home *** CD-ROM | disk | FTP | other *** search
/ Aminet 52 / Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso / Aminet / game / demo / ToTDemo0.45_R5.lha / talesdemo / rexx / MiamiDxOnline.rexx < prev    next >
OS/2 REXX Batch file  |  2000-06-27  |  3KB  |  80 lines

  1. /******************************************************************************************************/
  2. /* Online-Script mit Arexx                                                                            */
  3. /*     © by Martin Wolf / Eternity Hard & Software                                                  */
  4. /*                                                                                      */
  5. /*      V1.01 Env-Vars eingebaut                                                                      */
  6. /*      V1.02 Script verfeinert                                                                       */
  7. /*                                                                                                    */
  8. /*      First Bit set: 03.05.1998                                                                     */
  9. /*      Last Bit set : 01.09.1999                                                                     */
  10. /******************************************************************************************************/
  11.  
  12. OPTIONS RESULTS
  13. OPTIONS FAILAT 31
  14. SIGNAL ON ERROR
  15.  
  16. ADDRESS COMMAND
  17.     'SetEnv ToT:Data/TOT_ONLINE 0'                /* Miami-EnvVar resetten              */
  18.     counter_MW=0
  19.     DO UNTIL SHOW('P','MIAMI.1')                /* Auf Miami warten                   */
  20.       SIGNAL OFF ERROR
  21.       'WaitForPort MIAMI.1'
  22.       SIGNAL ON ERROR
  23.       IF counter_MW=3 THEN
  24.          DO
  25.            'SetEnv ToT:Data/TOT_ONLINE -3'            /* Miami-EnvVar auf Fehler setzten */
  26.            EXIT
  27.          END
  28.       counter_MW=counter_MW+1
  29.     END
  30.      IF SHOW('P','MIAMI.1') THEN
  31.     DO
  32.       'SetEnv ToT:Data/TOT_ONLINE 1'                /* Miami-Port wurde gefunden          */
  33.       miamiport = MIAMI.1                    /* ist auf jeden Fall der aktive Port */
  34.     END
  35.     IF ~SHOW('P','MIAMI.1') THEN
  36.     DO
  37.       'SetEnv ToT:Data/TOT_ONLINE -1'                /* Konnte Miami nicht finden          */
  38.       EXIT
  39.     END
  40.  
  41. ADDRESS (miamiport)
  42.     SIGNAL OFF ERROR
  43.     ISONLINE
  44.     SIGNAL ON ERROR
  45.     status_MW=rc
  46.  
  47.     IF (status_MW=0) THEN
  48.     DO
  49.       SIGNAL OFF ERROR
  50.       ONLINE
  51.       ISONLINE
  52.       SIGNAL ON ERROR
  53.  
  54. ADDRESS COMMAND
  55.       IF (rc=0) THEN 'SetEnv ToT:Data/TOT_ONLINE -3'    /* Fehler beim LogIn              */
  56.         ELSE 'SetEnv ToT:Data/TOT_ONLINE 2'
  57.     END
  58.     ELSE ADDRESS COMMAND 'SetEnv ToT:Data/TOT_ONLINE 3'    /* Miami war schon Online !          */
  59.  
  60.     EXIT
  61.  
  62. ERROR:
  63. ADDRESS COMMAND
  64.     'SetEnv ToT:Data/TOT_ONLINE -1'                /* Message : Found Miami              */
  65.     EXIT
  66.  
  67. /******************************************************************************************************/
  68. /* Erklärung zu den Env-Variablen                                                                     */
  69. /*     TOT_ONLINE                                                                     */
  70. /*                                                                                      */
  71. /*    -3=Fehler beim Miami-Login                                              */
  72. /*    -2=Konnte Miami-Port nicht finden                                      */
  73. /*    -1=Fehler im Script                                                      */
  74. /*       0=Miami-Port wurde nicht gefunden                                                            */
  75. /*       1=Miami-Port gefunden und Script versucht online zu gehen                                    */
  76. /*     2=Miami ist online                                                                           */
  77. /*     3=Miami war schon online !                                                                  */
  78. /*                                                                                                    */
  79. /******************************************************************************************************/
  80.